#! /usr/bin/perl
use strict;
use warnings;

###### 
# NGSbox - bioinformatics analysis tools for next generation sequencing data
#
# Copyright 2007-2011 Stephan Ossowski, Korbinian Schneeberger
# 
# NGSbox is free software: you can redistribute it and/or modify it under the 
# terms of the GNU General Public License as published by the Free Software 
# Foundation, either version 3 of the License, or any later version.
#
# NGSbox is distributed in the hope that it will be useful, but WITHOUT ANY 
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# Please find the GNU General Public License at <http://www.gnu.org/licenses/>.
#
#  -------------------------------------------------------------------------
#
#  Module: Analysis::ConsensusSequence::Callability::accessible_space.pl
#  Purpose:
#  In:
#  Out:
#



my $file = shift or die;

my $callable = 0;
my $not_callable = 0;

open FILE, $file or die "Cannot open input file.\n";
while( <FILE> ) {
	chomp;
	my @a = split("\t", $_);
	if($a[5] >= 25 && $a[7] >= 0.7) {
		$callable++;
	}
	else {
		$not_callable++;
	}
}

print "$callable\t$not_callable\n";

exit(0);
